{% extends "categories/base_categories.html" %}


{% block title %}{{ object.name }} categories{% endblock %}
{% block body_class %}{{ block.super }} hierarchy_detail{% endblock %}
{% block body_id %}hierarchy_{{ object.id }}{% endblock %}


{% block content_title %}
  <p class="back"><a href="../">Back</a></p>
  <h2>{{ object.name }}</h2>
{% endblock %}


{% block breadcrumbs %}
  <p>
    <a href="../">Hierarchies</a>
    <span>{{ object.name }}</span>
  </p>
{% endblock %}


{% block content %}
  {% if object.get_toplevel_category_list %}
  <h3 class="divider">Top-level categories</h3>
  <table class="category_list">
    <tr>
      <th>Category</th>
      <th>Path</th>
    </tr>
    {% for category in object.get_toplevel_category_list %}
    <tr>
      <td><a href="./{{ category.slug }}/">{{ category.name }}</a></td>
      <td class="path">{{ category.path }}</td>
    </tr>
    {% endfor %}
  </table>
  {% endif %}
{% endblock %}